<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head>
	<title>todoList</title>
	<script type="text/javascript" src="./vue.js"></script>
</head>
<body>	
	<div id="app">
		<input  type="text" v-model="inputValue">
		<button v-on:click="btnHandler">提交</button>
		<ul>
			<li v-for="item in list">{{item}}</li>
		</ul>
	</div>
	<script>
		var app = new Vue({
			el : '#app' ,
			data : {
				list : [],
				inputValue : ''
			},
			methods : {
				btnHandler : function() {
					this.list.push(this.inputValue)
					this.inputValue = ''
				}
			}
		});
	</script>
</body>
</html>